using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._MultidimensionTools
{
    /// <summary>
    /// <para>Select by Dimension</para>
    /// <para>Updates the netCDF layer display or netCDF table view based on the dimension value.</para>
    /// <para>根据维度值更新 netCDF 图层显示或 netCDF 表视图。</para>
    /// </summary>    
    [DisplayName("Select by Dimension")]
    public class SelectByDimension : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SelectByDimension()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_layer_or_table">
        /// <para>Input Layer or Table</para>
        /// <para>The input netCDF raster layer, netCDF feature layer, netCDF table view, or mosaic layer. If the input is a mosaic layer, it must be multidimensional.</para>
        /// <para>输入 netCDF 栅格图层、netCDF 要素图层、netCDF 表视图或镶嵌图层。如果输入是镶嵌图层，则它必须是多维的。</para>
        /// </param>
        public SelectByDimension(object _in_layer_or_table)
        {
            this._in_layer_or_table = _in_layer_or_table;
        }
        public override string ToolboxName => "Multidimension Tools";

        public override string ToolName => "Select by Dimension";

        public override string CallName => "md.SelectByDimension";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_layer_or_table, _dimension_values, _value_selection_method.GetGPValue(), _output_layer_or_table];

        /// <summary>
        /// <para>Input Layer or Table</para>
        /// <para>The input netCDF raster layer, netCDF feature layer, netCDF table view, or mosaic layer. If the input is a mosaic layer, it must be multidimensional.</para>
        /// <para>输入 netCDF 栅格图层、netCDF 要素图层、netCDF 表视图或镶嵌图层。如果输入是镶嵌图层，则它必须是多维的。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer or Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_layer_or_table { get; set; }


        /// <summary>
        /// <para>Dimension Values</para>
        /// <para><xdoc>
        ///   <para>A set of dimension-value pairs used to specify a slice of a multidimensional variable.</para>
        ///   <bulletList>
        ///     <bullet_item>Dimension—A netCDF dimension.</bullet_item><para/>
        ///     <bullet_item>Value—A dimension value that specifies a slice of a multidimensional variable.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一组维度-值对，用于指定多维变量的切片。</para>
        ///   <bulletList>
        ///     <bullet_item>维度 - netCDF 维度。</bullet_item><para/>
        ///     <bullet_item>值 - 指定多维变量切片的维度值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dimension Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _dimension_values { get; set; } = null;


        /// <summary>
        /// <para>Value Selection Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the dimension value selection method that will be used.</para>
        ///   <bulletList>
        ///     <bullet_item>By value—The input value is matched with the actual dimension value.</bullet_item><para/>
        ///     <bullet_item>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将使用的尺寸值选择方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按值 - 输入值与实际尺寸值匹配。</bullet_item><para/>
        ///     <bullet_item>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value Selection Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _value_selection_method_value _value_selection_method { get; set; } = _value_selection_method_value._BY_VALUE;

        public enum _value_selection_method_value
        {
            /// <summary>
            /// <para>By index</para>
            /// <para>By index—The input value is matched with the position or index of a dimension value. The index is 0 based; that is, the position starts at 0.</para>
            /// <para>按索引 - 输入值与维度值的位置或索引匹配。该指数以 0 为基础;也就是说，仓位从 0 开始。</para>
            /// </summary>
            [Description("By index")]
            [GPEnumValue("BY_INDEX")]
            _BY_INDEX,

            /// <summary>
            /// <para>By value</para>
            /// <para>By value—The input value is matched with the actual dimension value.</para>
            /// <para>按值 - 输入值与实际尺寸值匹配。</para>
            /// </summary>
            [Description("By value")]
            [GPEnumValue("BY_VALUE")]
            _BY_VALUE,

        }

        /// <summary>
        /// <para>Updated layer or table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated layer or table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_layer_or_table { get; set; }


        public SelectByDimension SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}